package com.file.system.entity.system;


import com.file.system.plugin.validated.SQLInjectionValidation;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
import java.io.Serializable;


/**
 * 角色关联用户账号
 *
 * @author jch
 */
@Data
@Accessors(chain = true)
public class WebRoleUser implements Serializable {

    private static final long serialVersionUID = 1L;


    //新增
    public interface add extends Default {
    }

    //修改
    public interface update extends Default {
    }

    /**
     *
     */
    @NotNull(groups = {update.class}, message = "不能为空")
    @Min(value = 1, message = "id长度最小1")
    private Long id;
    /**
     * 角色id
     */
    @NotNull(groups = {add.class, update.class}, message = "角色id不能为空")
    @Min(value = 1, message = "角色id最小1")
    private Long fkRoleId;
    /**
     * 用户id
     */
    @NotNull(groups = {add.class, update.class}, message = "用户id不能为空")
    @Min(value = 1, message = "用户id最小1")
    private Long fkUserId;
}
